Optimal. Leaf size=38 \[ \frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a-a \sec (c+d x)}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0219381, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {3774, 203} \[ \frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a-a \sec (c+d x)}}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3774
Rule 203
Rubi steps
\begin{align*} \int \sqrt{a-a \sec (c+d x)} \, dx &=\frac{(2 a) \operatorname{Subst}\left (\int \frac{1}{a+x^2} \, dx,x,\frac{a \tan (c+d x)}{\sqrt{a-a \sec (c+d x)}}\right )}{d}\\ &=\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a-a \sec (c+d x)}}\right )}{d}\\ \end{align*}
Mathematica [C] time = 3.43279, size = 188, normalized size = 4.95 \[ -\frac{\sqrt{\cos (c)-i \sin (c)} \cos (c+d x) \left (\cot \left (\frac{1}{2} (c+d x)\right )+i\right ) \sqrt{a-a \sec (c+d x)} \left (\tanh ^{-1}\left (\frac{e^{i d x}}{\sqrt{\cos (c)-i \sin (c)} \sqrt{e^{2 i d x} (\cos (c)+i \sin (c))-i \sin (c)+\cos (c)}}\right )+\tanh ^{-1}\left (\frac{\sqrt{e^{2 i d x} (\cos (c)+i \sin (c))-i \sin (c)+\cos (c)}}{\sqrt{\cos (c)-i \sin (c)}}\right )\right )}{d \sqrt{i \sin (c) \left (-1+e^{2 i d x}\right )+\cos (c) \left (1+e^{2 i d x}\right )}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.138, size = 91, normalized size = 2.4 \begin{align*} -{\frac{\sqrt{2}\sin \left ( dx+c \right ) }{d \left ( -1+\cos \left ( dx+c \right ) \right ) }\sqrt{{\frac{a \left ( -1+\cos \left ( dx+c \right ) \right ) }{\cos \left ( dx+c \right ) }}}\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\arctan \left ({\frac{\sqrt{2}}{2}\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.95359, size = 197, normalized size = 5.18 \begin{align*} \frac{\sqrt{a} \arctan \left ({\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac{1}{4}} \sin \left (\frac{1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + \sin \left (d x + c\right ),{\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac{1}{4}} \cos \left (\frac{1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + \cos \left (d x + c\right )\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.37688, size = 464, normalized size = 12.21 \begin{align*} \left [\frac{\sqrt{-a} \log \left (-\frac{4 \,{\left (2 \, \cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt{-a} \sqrt{\frac{a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} +{\left (8 \, a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{\sin \left (d x + c\right )}\right )}{2 \, d}, -\frac{\sqrt{a} \arctan \left (\frac{2 \,{\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt{a} \sqrt{\frac{a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}}}{{\left (2 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}\right )}{d}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{- a \sec{\left (c + d x \right )} + a}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.51833, size = 88, normalized size = 2.32 \begin{align*} -\frac{2 \, \sqrt{a} \arctan \left (\frac{\sqrt{2} \sqrt{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - a}}{2 \, \sqrt{a}}\right ) \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right ) \mathrm{sgn}\left (\cos \left (d x + c\right )\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]